import request from '@/utils/request'

// 货品申请列表
export function materialList(query) {
  return request({
    url: '/erp/material/list',
    method: 'get',
    params: query
  })
}

export function materialApply(adminOrderId) {
  return request({
    url: '/erp/depot/purchase',
    method: 'get',
    params: {adminOrderId}
  })
}

export function billnumber() {
  return request({
    url: '/erp/depot/billnumber',
    method: 'get',
  })
}

// 店铺货品列表
export function materialShopList(query) {
  return request({
    url: '/shopMerchandise/list',
    method: 'get',
    params: query
  })
}

// 同步erp数据
export function syncErp() {
  return request({
    url: '/erp/material/sync',
    method: 'get'
  })
}

// 获得导入原料模板
export function getImportTemplate() {
  return request({
    url: '/shopMerchandise/get-import-template',
    method: 'get',
    responseType: 'blob'
  })
}
